//
//  UIViewController+AlertViewController.m
//  meiyaya
//
//  Created by 张领瑞 on 2017/9/1.
//  Copyright © 2017年 ShiFeiEr. All rights reserved.
//

#import "UIViewController+AlertViewController.h"

@implementation UIViewController (AlertViewController)


-(void)presentAlertViewWithControlTitle:(NSString*)title
                                Message:(NSString*)message
                            ActionTitle:(NSString*)subTitle
{
    UIAlertController *alertC = [UIAlertController alertControllerWithTitle:title  message:message preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *alertAction = [UIAlertAction actionWithTitle:subTitle style:UIAlertActionStyleDefault handler:nil];
    [alertC addAction:alertAction];
    [self presentViewController:alertC animated:YES completion:nil];
}


-(void)presentDefaultAlertViewWithMessage:(NSString*)message

{
    UIAlertController *alertC = [UIAlertController alertControllerWithTitle:@"提示"  message:message preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *alertAction = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:nil];
    [alertC addAction:alertAction];
    [self presentViewController:alertC animated:YES completion:nil];
}



@end
